'use strict';
// Copyright 2014 Blueant Inc. All Rights Reserved.

/**
 * @fileoverview 市场物品信息
 * @author sundbcn@gmail.com (sun debing)
 */

var mongoose = require('mongoose');

///////////////////////////////////////////////////////////
/**
 * 竞技场商城物品信息
 * @type {mongoose}
 */
var arenaShopItemSchema = new mongoose.Schema({
    // 格子编号
    shop_pos: {
        type: Number,
        required: true
    },

    // 物品ID
    shop_id: {
        type: Number,
        required: true
    },

    // 可购买次数
    count: {
        type: Number,
        required: true
    }
});

if (!arenaShopItemSchema.options.toJSON) {
    arenaShopItemSchema.options.toJSON = {};
}
/* jshint unused:false */
arenaShopItemSchema.options.toJSON.transform = function (doc, ret) {
    delete ret._id;
    delete ret.__v;
};

module.exports = arenaShopItemSchema;
